package com.demo.phonerepair.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.phonerepair.mapper.RoleMapper;
import com.demo.phonerepair.pojo.Role;
import com.demo.phonerepair.service.RoleService;
import com.demo.phonerepair.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    @Autowired
    private RoleMapper roleMapper;
    @Override
    public Result<List<Role>> listAllRoles() {
        List<Role> roles = roleMapper.listAllRoles();
        return Result.success(roles);
    }
}
